libxc: Fix IOCTL_PRIVCMD_MMAPBATCH_V2 fallback check
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 14 Jan 2010 14:10:40 +0000 (14:10 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 14 Jan 2010 14:10:40 +0000 (14:10 +0000)
privcmd_ioctl returns EINVAL if the type is not supported.
This fixes the guest booting issue caused by C/S 20791.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
tools/libxc/xc_linux.c

index e0e807f2cc514aeac4518024c7d55a321867000e..3f3bc10d95365bf1e301e4d7c95145cc58876d4a 100644 (file)
@@ -180,7 +180,7 @@ void *xc_map_foreign_bulk(int xc_handle, uint32_t dom, int prot,
         }
     }
 
-    if ( rc < 0 && errno == ENOTTY && (int)num > 0 )
+    if ( rc < 0 && errno == EINVAL && (int)num > 0 )
     {
         /*
          * IOCTL_PRIVCMD_MMAPBATCH_V2 is not supported - fall back to